home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / ActiveX Controlls / XP Suite / DATA1.CAB / XP_StatusBar_Sample_Files / Form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  2003-04-24  |  15.3 KB  |  449 lines

  1. VERSION 5.00
  2. Object = "{648E6B3D-CE0B-46A0-A482-B4EB00F0B25F}#1.0#0"; "ciaXPStatusBar.ocx"
  3. Object = "{D1212DE2-1920-413F-833E-9DE3B4743ED2}#1.0#0"; "ciaXPProgress.ocx"
  4. Begin VB.Form Form1 
  5.    BackColor       =   &H00FFFFFF&
  6.    Caption         =   "Form1"
  7.    ClientHeight    =   5415
  8.    ClientLeft      =   60
  9.    ClientTop       =   450
  10.    ClientWidth     =   15045
  11.    LinkTopic       =   "Form1"
  12.    LockControls    =   -1  'True
  13.    ScaleHeight     =   361
  14.    ScaleMode       =   3  'Pixel
  15.    ScaleWidth      =   1003
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin VB.Frame Frame2 
  18.       BackColor       =   &H00FFFFFF&
  19.       Caption         =   "General"
  20.       Height          =   1935
  21.       Left            =   5325
  22.       TabIndex        =   12
  23.       Top             =   90
  24.       Width           =   4695
  25.       Begin VB.ComboBox cboColorScheme 
  26.          Height          =   315
  27.          ItemData        =   "Form1.frx":0000
  28.          Left            =   1215
  29.          List            =   "Form1.frx":000D
  30.          TabIndex        =   22
  31.          Top             =   630
  32.          Width           =   1845
  33.       End
  34.       Begin VB.TextBox txtPRG 
  35.          Height          =   330
  36.          Left            =   1935
  37.          TabIndex        =   20
  38.          Text            =   "0"
  39.          Top             =   1395
  40.          Width           =   510
  41.       End
  42.       Begin VB.CommandButton cmdProgressBar 
  43.          Caption         =   "Set Progress Bar Value"
  44.          Height          =   495
  45.          Left            =   165
  46.          TabIndex        =   19
  47.          Top             =   1305
  48.          Width           =   1695
  49.       End
  50.       Begin VB.ComboBox cboJustify 
  51.          Height          =   315
  52.          ItemData        =   "Form1.frx":003A
  53.          Left            =   1215
  54.          List            =   "Form1.frx":0047
  55.          TabIndex        =   13
  56.          Top             =   255
  57.          Width           =   1845
  58.       End
  59.       Begin VB.Label Label8 
  60.          Alignment       =   1  'Right Justify
  61.          AutoSize        =   -1  'True
  62.          BackStyle       =   0  'Transparent
  63.          Caption         =   "Color Scheme:"
  64.          Height          =   195
  65.          Left            =   120
  66.          TabIndex        =   23
  67.          Top             =   690
  68.          Width           =   1035
  69.       End
  70.       Begin VB.Label Label3 
  71.          AutoSize        =   -1  'True
  72.          BackStyle       =   0  'Transparent
  73.          Caption         =   "%"
  74.          Height          =   195
  75.          Left            =   2520
  76.          TabIndex        =   21
  77.          Top             =   1440
  78.          Width           =   120
  79.       End
  80.       Begin VB.Label Label9 
  81.          Alignment       =   1  'Right Justify
  82.          AutoSize        =   -1  'True
  83.          BackStyle       =   0  'Transparent
  84.          Caption         =   "Justify:"
  85.          Height          =   195
  86.          Left            =   690
  87.          TabIndex        =   14
  88.          Top             =   315
  89.          Width           =   480
  90.       End
  91.    End
  92.    Begin VB.Frame Frame1 
  93.       BackColor       =   &H00FFFFFF&
  94.       Caption         =   "Panel"
  95.       Height          =   2250
  96.       Left            =   5325
  97.       TabIndex        =   2
  98.       Top             =   2100
  99.       Width           =   4695
  100.       Begin VB.CommandButton cmdUpdate 
  101.          Caption         =   "Update"
  102.          Height          =   435
  103.          Left            =   3195
  104.          TabIndex        =   24
  105.          Top             =   1050
  106.          Width           =   1140
  107.       End
  108.       Begin VB.TextBox txtPanelWidth 
  109.          Height          =   345
  110.          Left            =   1065
  111.          TabIndex        =   17
  112.          Top             =   1770
  113.          Width           =   540
  114.       End
  115.       Begin VB.CheckBox chkEnabled 
  116.          BackColor       =   &H00FFFFFF&
  117.          Caption         =   "Enabled"
  118.          Height          =   330
  119.          Left            =   2955
  120.          TabIndex        =   16
  121.          Top             =   1785
  122.          Width           =   1215
  123.       End
  124.       Begin VB.CheckBox chkAutoSize 
  125.          BackColor       =   &H00FFFFFF&
  126.          Caption         =   "Auto Size"
  127.          Height          =   330
  128.          Left            =   1815
  129.          TabIndex        =   15
  130.          Top             =   1785
  131.          Width           =   1215
  132.       End
  133.       Begin VB.ComboBox cboPosition 
  134.          Height          =   315
  135.          ItemData        =   "Form1.frx":006A
  136.          Left            =   1065
  137.          List            =   "Form1.frx":0074
  138.          TabIndex        =   10
  139.          Top             =   1395
  140.          Width           =   1845
  141.       End
  142.       Begin VB.ComboBox cboAlignment 
  143.          Height          =   315
  144.          ItemData        =   "Form1.frx":009E
  145.          Left            =   1065
  146.          List            =   "Form1.frx":00AB
  147.          TabIndex        =   8
  148.          Top             =   1035
  149.          Width           =   1845
  150.       End
  151.       Begin VB.HScrollBar hsbIDX 
  152.          Height          =   270
  153.          Left            =   1665
  154.          Min             =   1
  155.          TabIndex        =   7
  156.          Top             =   255
  157.          Value           =   1
  158.          Width           =   480
  159.       End
  160.       Begin VB.TextBox txtCaption 
  161.          Height          =   345
  162.          Left            =   1065
  163.          TabIndex        =   5
  164.          Top             =   630
  165.          Width           =   3495
  166.       End
  167.       Begin VB.TextBox txtPanelID 
  168.          Height          =   345
  169.          Left            =   1065
  170.          TabIndex        =   3
  171.          Top             =   225
  172.          Width           =   540
  173.       End
  174.       Begin VB.Label Label11 
  175.          Alignment       =   1  'Right Justify
  176.          AutoSize        =   -1  'True
  177.          BackStyle       =   0  'Transparent
  178.          Caption         =   "Panel Width:"
  179.          Height          =   195
  180.          Left            =   90
  181.          TabIndex        =   18
  182.          Top             =   1845
  183.          Width           =   915
  184.       End
  185.       Begin VB.Label Label7 
  186.          Alignment       =   1  'Right Justify
  187.          AutoSize        =   -1  'True
  188.          BackStyle       =   0  'Transparent
  189.          Caption         =   "Position:"
  190.          Height          =   195
  191.          Left            =   405
  192.          TabIndex        =   11
  193.          Top             =   1455
  194.          Width           =   600
  195.       End
  196.       Begin VB.Label Label4 
  197.          Alignment       =   1  'Right Justify
  198.          AutoSize        =   -1  'True
  199.          BackStyle       =   0  'Transparent
  200.          Caption         =   "Alignment:"
  201.          Height          =   195
  202.          Left            =   270
  203.          TabIndex        =   9
  204.          Top             =   1095
  205.          Width           =   735
  206.       End
  207.       Begin VB.Label Label6 
  208.          AutoSize        =   -1  'True
  209.          BackStyle       =   0  'Transparent
  210.          Caption         =   "Caption:"
  211.          Height          =   195
  212.          Left            =   420
  213.          TabIndex        =   6
  214.          Top             =   720
  215.          Width           =   585
  216.       End
  217.       Begin VB.Label Label5 
  218.          AutoSize        =   -1  'True
  219.          BackStyle       =   0  'Transparent
  220.          Caption         =   "Panel:"
  221.          Height          =   195
  222.          Left            =   555
  223.          TabIndex        =   4
  224.          Top             =   300
  225.          Width           =   450
  226.       End
  227.    End
  228.    Begin ciaXPStatusBar.XPStatusBar XPStatusBar1 
  229.       Align           =   2  'Align Bottom
  230.       Height          =   540
  231.       Left            =   0
  232.       TabIndex        =   0
  233.       Top             =   4875
  234.       Width           =   15045
  235.       _ExtentX        =   26538
  236.       _ExtentY        =   953
  237.       Panels          =   6
  238.       PictureShadowEffect1=   0   'False
  239.       Enabled1        =   -1  'True
  240.       Key1            =   ""
  241.       Alignment1      =   0
  242.       Caption1        =   "Panel 1"
  243.       CaptionForeColor1=   0
  244.       CaptionBold1    =   0   'False
  245.       CaptionItalic1  =   0   'False
  246.       CaptionUnderline1=   0   'False
  247.       CaptionPosition1=   1
  248.       Picture1        =   "Form1.frx":00E2
  249.       PictureWidth1   =   32
  250.       PictureHeight1  =   32
  251.       PictureSize1    =   2
  252.       PanelStyle1     =   0
  253.       PanelWidth1     =   441
  254.       PanelMinWidth1  =   100
  255.       PicturePosition1=   1
  256.       MaskColor1      =   16777215
  257.       PictureShadowEffect2=   0   'False
  258.       Enabled2        =   -1  'True
  259.       Key2            =   ""
  260.       Alignment2      =   0
  261.       Caption2        =   "Panel 2"
  262.       CaptionForeColor2=   0
  263.       CaptionBold2    =   0   'False
  264.       CaptionItalic2  =   0   'False
  265.       CaptionUnderline2=   0   'False
  266.       CaptionPosition2=   1
  267.       Picture2        =   "Form1.frx":0434
  268.       PictureWidth2   =   32
  269.       PictureHeight2  =   32
  270.       PictureSize2    =   2
  271.       PanelStyle2     =   0
  272.       PanelWidth2     =   63
  273.       PanelMinWidth2  =   100
  274.       PicturePosition2=   1
  275.       MaskColor2      =   16777215
  276.       PictureShadowEffect3=   0   'False
  277.       Enabled3        =   -1  'True
  278.       Key3            =   ""
  279.       Alignment3      =   0
  280.       Caption3        =   "Panel 3"
  281.       CaptionForeColor3=   0
  282.       CaptionBold3    =   0   'False
  283.       CaptionItalic3  =   0   'False
  284.       CaptionUnderline3=   0   'False
  285.       CaptionPosition3=   1
  286.       Picture3        =   "Form1.frx":07C6
  287.       PictureWidth3   =   32
  288.       PictureHeight3  =   32
  289.       PictureSize3    =   2
  290.       PanelStyle3     =   0
  291.       PanelWidth3     =   250
  292.       PanelMinWidth3  =   100
  293.       PicturePosition3=   1
  294.       MaskColor3      =   16777215
  295.       AutoSize3       =   0   'False
  296.       PictureShadowEffect4=   0   'False
  297.       Enabled4        =   -1  'True
  298.       Key4            =   ""
  299.       Alignment4      =   0
  300.       Caption4        =   "Panel 4"
  301.       CaptionForeColor4=   0
  302.       CaptionBold4    =   0   'False
  303.       CaptionItalic4  =   0   'False
  304.       CaptionUnderline4=   0   'False
  305.       CaptionPosition4=   0
  306.       Picture4        =   "Form1.frx":0B58
  307.       PictureWidth4   =   32
  308.       PictureHeight4  =   32
  309.       PictureSize4    =   2
  310.       PanelStyle4     =   0
  311.       PanelWidth4     =   62
  312.       PanelMinWidth4  =   100
  313.       PicturePosition4=   1
  314.       MaskColor4      =   16777215
  315.       PictureShadowEffect5=   0   'False
  316.       Enabled5        =   -1  'True
  317.       Key5            =   ""
  318.       Alignment5      =   0
  319.       Caption5        =   ""
  320.       CaptionForeColor5=   0
  321.       CaptionBold5    =   0   'False
  322.       CaptionItalic5  =   0   'False
  323.       CaptionUnderline5=   0   'False
  324.       CaptionPosition5=   1
  325.       Picture5        =   "Form1.frx":0EAA
  326.       PictureWidth5   =   32
  327.       PictureHeight5  =   32
  328.       PictureSize5    =   2
  329.       PanelStyle5     =   2
  330.       PanelWidth5     =   82
  331.       PanelMinWidth5  =   100
  332.       PicturePosition5=   1
  333.       MaskColor5      =   16777215
  334.       PictureShadowEffect6=   0   'False
  335.       Enabled6        =   -1  'True
  336.       Key6            =   ""
  337.       Alignment6      =   0
  338.       Caption6        =   ""
  339.       CaptionForeColor6=   0
  340.       CaptionBold6    =   0   'False
  341.       CaptionItalic6  =   0   'False
  342.       CaptionUnderline6=   0   'False
  343.       CaptionPosition6=   1
  344.       Picture6        =   "Form1.frx":123C
  345.       PictureWidth6   =   32
  346.       PictureHeight6  =   32
  347.       PictureSize6    =   2
  348.       PanelStyle6     =   1
  349.       PanelWidth6     =   85
  350.       PanelMinWidth6  =   100
  351.       PicturePosition6=   1
  352.       MaskColor6      =   16777215
  353.       Theme           =   1
  354.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  355.          Name            =   "MS Sans Serif"
  356.          Size            =   8.25
  357.          Charset         =   0
  358.          Weight          =   400
  359.          Underline       =   0   'False
  360.          Italic          =   0   'False
  361.          Strikethrough   =   0   'False
  362.       EndProperty
  363.       HotTracking     =   -1  'True
  364.       LicValid        =   -1  'True
  365.       Begin ciaXPProgress.ProgressBar prg 
  366.          Height          =   195
  367.          Left            =   9930
  368.          TabIndex        =   1
  369.          Top             =   210
  370.          Width           =   1530
  371.          _ExtentX        =   2699
  372.          _ExtentY        =   344
  373.          GradientFrom    =   3724597
  374.          GradientTo      =   11333035
  375.          HighLightColorFrom=   3724597
  376.          HighLightColorTo=   11333035
  377.          LicValid        =   -1  'True
  378.       End
  379.    End
  380. Attribute VB_Name = "Form1"
  381. Attribute VB_GlobalNameSpace = False
  382. Attribute VB_Creatable = False
  383. Attribute VB_PredeclaredId = True
  384. Attribute VB_Exposed = False
  385. Dim PNL As XPStatusBar
  386. Dim LastColumn As Integer
  387. Private Sub cboColorScheme_Click()
  388. XPStatusBar1.Theme = cboColorScheme.ListIndex
  389. End Sub
  390. Private Sub cboJustify_Click()
  391. XPStatusBar1.Justify = cboJustify.ListIndex
  392. End Sub
  393. Private Sub cmdUpdate_Click()
  394. hsbIDX_Change
  395. End Sub
  396. Private Sub Form_Load()
  397. Set XPStatusBar1.PanelControl(3) = prg
  398. cboJustify.ListIndex = XPStatusBar1.Justify
  399. cboColorScheme.ListIndex = XPStatusBar1.Theme
  400. hsbIDX.Max = XPStatusBar1.PanelCount
  401. hsbIDX_Change
  402. End Sub
  403. Private Sub cmdProgressBar_Click()
  404. prg.Value = Val(txtPRG)
  405. End Sub
  406. Private Sub PropertyPage_ApplyChanges()
  407. Dim i
  408. With XPStatusBar1
  409.     i = LastColumn
  410.     .Caption(i) = txtCaption
  411.     .AutoSize(i) = (chkAutoSize.Value = vbChecked)
  412.     .PanelWidth(i) = Val(txtPanelWidth)
  413.     .Alignment(i) = cboAlignment.ListIndex
  414.     .CaptionPosition(i) = cboPosition.ListIndex
  415.     .Enabled(i) = (chkEnabled.Value = vbChecked)
  416. End With
  417. 'XPStatusBar1.UpdateHeaders
  418. End Sub
  419. Private Sub hsbIDX_Change()
  420. Dim i
  421. Dim L As Boolean, R As Boolean
  422. PropertyPage_ApplyChanges
  423. i = hsbIDX
  424. LastColumn = i
  425. With XPStatusBar1
  426.     If .PanelCount >= i Then
  427.         txtPanelID = i
  428.         txtCaption = .Caption(i)
  429.         txtPanelWidth = .PanelWidth(i)
  430.         cboAlignment.ListIndex = .Alignment(i)
  431.         cboPosition.ListIndex = .CaptionPosition(i)
  432.         chkAutoSize.Value = Abs(.AutoSize(i))
  433.         chkEnabled.Value = Abs(.Enabled(i))
  434.     Else
  435.         MsgBox "Column index '" & i & "' not found.", vbCritical
  436.    '     SetTagControls
  437.     End If
  438. End With
  439. End Sub
  440. Private Sub XPStatusBar1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single, PanelIndex As Integer, ByVal Panel As ciaXPStatusBar.Panel)
  441. Debug.Print "XPStatusBar1_MouseDown Event  Button = " & Button & "  Shift = " & Shift & "   X = " & X & "  Y = " & Y & "   Panel Index = " & PanelIndex & "  Panel.Caption = " & Panel.Caption
  442. End Sub
  443. Private Sub XPStatusBar1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single, PanelIndex As Integer, ByVal Panel As ciaXPStatusBar.Panel)
  444. Debug.Print "XPStatusBar1_MouseMove Event  Button = " & Button & "  Shift = " & Shift & "   X = " & X & "  Y = " & Y & "   Panel Index = " & PanelIndex & "  Panel.Caption = " & Panel.Caption
  445. End Sub
  446. Private Sub XPStatusBar1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single, PanelIndex As Integer, ByVal Panel As ciaXPStatusBar.Panel)
  447. Debug.Print "XPStatusBar1_MouseUp Event  Button = " & Button & "  Shift = " & Shift & "   X = " & X & "  Y = " & Y & "   Panel Index = " & PanelIndex & "  Panel.Caption = " & Panel.Caption
  448. End Sub
  449.